#include <stdio.h>

int a[25][25] = {{0}, {0, 1}, {0, 1, 1}};

int f(int x, int y)
{
    if (a[x][y])
        return a[x][y];
    else
        return (a[x][y] = a[x - 1][y - 1] + a[x][y - 1]);
}

int main()
{
    int n = 0;
    scanf("%d", &n);
    ++n;
    for (int i = 1; i < n; ++i)
    {
        for (int j = 1; j < i + 1; ++j)
        {
            printf("%d ", f(j, i));
        }
        printf("\n");
    }
    return 0;
}